package argo.hot100.dp;

public class ClimbStairs {

    public int climbStairs(int n) {

        int res = 0, s1 = 1, s2 = 2;
        if (n <= 2) {
            return n;
        }
        for (int i = 3; i <=n ; i++) {
            res=s1+s2;
            s1=s2;
            s2=res;
        }

        return res;
    }


}
